package cn.xuqiudong.work.baidu.model;

import java.util.List;

/**
 * 描述:
 *  百度文本翻译响应结果
 * @author Vic.xu
 * @since 2024-12-25 17:05
 */
public class TranslationResponse {
    /*
    {
	"errno": 0,
	"data": {
		"from": "zh",
		"to": "en",
		"trans_result": [
			{
				"dst": "====title====product update",
				"src": "====title====产品更新"
			}		]
	}
}
     */

    public int errno;
    public String errmsg;
    public Data data;

    public TranslationResponse() {
    }

    public TranslationResponse(int errno, String errmsg, Data data) {
        this.errno = errno;
        this.errmsg = errmsg;
        this.data = data;
    }

    public int getErrno() {
        return errno;
    }

    public void setErrno(int errno) {
        this.errno = errno;
    }

    public String getErrmsg() {
        return errmsg;
    }

    public void setErrmsg(String errmsg) {
        this.errmsg = errmsg;
    }

    public Data getData() {
        return data;
    }

    public void setData(Data data) {
        this.data = data;
    }

    public static class Data {
        public String from;
        public String to;
        public List<TransResult> trans_result;

        public String getFrom() {
            return from;
        }

        public void setFrom(String from) {
            this.from = from;
        }

        public String getTo() {
            return to;
        }

        public void setTo(String to) {
            this.to = to;
        }

        public List<TransResult> getTrans_result() {
            return trans_result;
        }

        public void setTrans_result(List<TransResult> trans_result) {
            this.trans_result = trans_result;
        }
    }

    public static class TransResult {
        public String src;
        public String dst;

        public String getSrc() {
            return src;
        }

        public void setSrc(String src) {
            this.src = src;
        }

        public String getDst() {
            return dst;
        }

        public void setDst(String dst) {
            this.dst = dst;
        }
    }
}
